package com.ms.service.module.fish.game;

import java.math.BigDecimal;

import com.ms.player.Player;
import com.xpec.c4.game.utility.GUID;

public class FishUser {

	private Player player;
	public FishUser(Player player ) {
		this.player = player;
	}
	
	public String getName() {
		return player.getName();
	}

	public boolean isRobot() {
		return player.isRobot();
	}

	public Long getCoin() {
		return player.getGoldCoin().longValue();
	}

	public GUID getUid() {
		return player.getGuid();
	}

	public void addCoin(int coin) {
		Long old = this.getCoin();
		
		long newCoin = old+coin;
		if(newCoin < 0)newCoin = 0L;
		player.setgoldCoin(new BigDecimal(newCoin));
		
	}

	public String getIcon() {
		return player.getFacephoto();
	}

	public int getSex() {
		return player.isGender()?1:2;
	}
	
	
	
}

